from my_models.regresion.RandomForest.forest import ForestRegressor
from my_models.regresion.Trees import TreeRegressor
from my_models.regresion.linear import LinearRegressor
from my_models.regresion.Bagging import B_Regressor
from my_models.regresion.elasticNet import ElasticNetRegressor
from my_models.regresion.lasso import LassoRegressor
from my_models.regresion.ridge import RidgeRegressor
from my_models.regresion.svm import SVMRegressor
from my_models.regresion.xgboost import xgbRegressor

from dataset.data_tool import get_data




regression_mapping = {

    "ForestRegressor": ForestRegressor(),
    "TreeRegressor": TreeRegressor(),
    "LinearRegressor": LinearRegressor(),
    "BRegressor": B_Regressor(),
    "ElasticRegressor": ElasticNetRegressor(),
    "LassoRegressor": LassoRegressor(),
    "FidgeRegressor": RidgeRegressor(),
    "SVMRegressor": SVMRegressor(),
    "xgbRegressor": xgbRegressor(),

}


def main():
    tr, va = get_data(r"D:\workspace\codes\machine-learning\dataset\data\data.csv", "Close")

    for k, model in regression_mapping.items():

        model.train(*tr)
        model.valid(*va)



if __name__ == '__main__':
    main()